﻿using System.Collections.Generic;
using RBOSS.Business.Products;
using RBOSS.Business.ShoppingCarts;
using RBOSS.Business.Views;

namespace RBOSS.Business.Presenters
{
    public class ShoppingCartPresenter
    {
        private readonly IShoppingCartView _view;
        private IShoppingCartSubsystem _shoppingCart;
        public ShoppingCartPresenter(IShoppingCartView view)
        {
            _view = view;
            _shoppingCart = new ShoppingCartSubsystem();
        }

        public List<IProduct> GetProducts()
        {
            return _shoppingCart.GetProducts();
        }


        public void RemoveProduct(int productId)
        {

            _shoppingCart.RemoveItemFromCart(productId);
        }

        public void ClearShoppingCart()
        {
            _shoppingCart.ClearItemFromCart();
        }

        

        public void CheckOut()
        {
            //implement checkout function
        }
    }
}